package com.chenxiao.responsibilityChain.design;

/**
 * @Author: CX
 * @Date: Created in  2023/05/28 16:23
 * @version: v1.0
 * @Description: TODO
 **/
public abstract class DesignModel {
    protected String name;
    protected DesignModel NextApprover;
    public DesignModel(String name){
        this.name = name;
    }
    // 调用自己，实现责任链，找上一级审批人
    protected DesignModel setNextApprove(DesignModel approver){
        this.NextApprover = approver;
        return this.NextApprover;
    }

    public abstract void approve(int amount);
}
